---
apiVersion: v1
kind: Secret
metadata:
  # 2021-09-23 migrate name from
  # prometheus-metrics-adapter-cert to prometheus-metrics-adapter-server-cert
  # because we change CA certificate data key
  # we generate new CA and cert because we don't want to write migration
  name: prometheus-metrics-adapter-server-cert
  namespace: d8-monitoring
  {{- include "helm_lib_module_labels" (list .) | nindent 2 }}
type: kubernetes.io/tls
data:
  tls.crt: {{ .Values.prometheusMetricsAdapter.internal.adapterCert.crt | b64enc }}
  tls.key: {{ .Values.prometheusMetricsAdapter.internal.adapterCert.key | b64enc }}
  ca.crt: {{ .Values.prometheusMetricsAdapter.internal.adapterCert.ca | b64enc }}
